package operation;

import Book.Book;
import Book.Booklist;

public class ExitOperation implements IOperation{
    @Override
    public void work(Booklist booklist) {
        System.out.println("退出系统");
        System.exit(0);//正常退出
        int currenSize = booklist.getUsedsize();
        for (int i = 0; i < currenSize; i++) {
            booklist.setBooks(i,null);
        }
        booklist.setUsedsize(0);
    }
}
